---@class Table_UICfgItem
local Table_UICfgItem = BaseClass("Table_UICfgItem", IDataItem)

function Table_UICfgItem:__ctor()
	---@type number @唯一ID
	self.Id = 0
	---@type string @资源路径
	self.Path = ""
	---@type number @界面类型
	self.UIType = 0
	---@type number @界面Panel数量
	self.PanelNum = 0
	---@type number @返回界面ID
	self.ReId = 0
	---@type boolean @关闭时是否销毁
	self.Destroy = false
	---@type boolean @切换场景时是否销毁
	self.DestroyUnload = false
	---@type boolean @是否可以通过导航栏返回按钮关闭界面 
	self.IsBackClose = false
	---@type number @镜头动画ID
	self.CameraMovieId = 0
	---@type number @界面层级
	self.Layer = 0
	---@type number @背景开关
	self.IsShowBg = 0
	---@type string @背景图片名称
	self.SceneBgName = ""
	---@type number @锁屏遮罩类型
	self.LockType = 0
	---@type number @是否显示3D相机
	self.Show3D = 0
	---@type number @功能开启新手指引ID
	self.OpenGuideId = 0
	---@type number @错误码ID
	self.ErrorId = 0
	---@type number @功能开关ID
	self.FuncSwitchId = 0
	---@type boolean @是否播放动画
	self.IsPlayTween = false
	---@type string @Ctrl脚本路径
	self.ScriptCtrl = ""
	---@type number @view脚本ID
	self.LuaObjId = 0
end

function Table_UICfgItem:Load(reader)
	self.temp = reader:ReadShortString()
	self.Id = tonumber(self.temp)
	self.Path = reader:ReadString()
	self.temp = reader:ReadShortString()
	self.UIType = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.PanelNum = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.ReId = tonumber(self.temp)
	self.Destroy = reader:ReadBool()
	self.DestroyUnload = reader:ReadBool()
	self.IsBackClose = reader:ReadBool()
	self.temp = reader:ReadShortString()
	self.CameraMovieId = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.Layer = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.IsShowBg = tonumber(self.temp)
	self.SceneBgName = reader:ReadString()
	self.temp = reader:ReadShortString()
	self.LockType = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.Show3D = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.OpenGuideId = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.ErrorId = tonumber(self.temp)
	self.temp = reader:ReadShortString()
	self.FuncSwitchId = tonumber(self.temp)
	self.IsPlayTween = reader:ReadBool()
	self.ScriptCtrl = reader:ReadString()
	self.temp = reader:ReadShortString()
	self.LuaObjId = tonumber(self.temp)
end

---@class Table_UICfgMgr : IDataMgr
local this = BaseClass("Table_UICfgMgr", IDataMgr)

function this:FileName()
	return "Txt/UICfg.txt"
end

---@return Table_UICfgItem
function this:GetItemByKey(key)
	return self.super.GetItemByKey(self, key)
end

---@return Table_UICfgItem
function this:GetItemByIdx(idx)
	return self.super.GetItemByIdx(self, idx)
end

function this:Load(reader)
	local item = Table_UICfgItem()
	item:Load(reader)
	self.mItemDic[item.Id] = self.mDataCount
	table.insert(self.mItemList, item)
end

---@type Table_UICfgMgr
Table_UICfgMgr = this()